package com.graduate.emos.wx.db.dao;

import com.graduate.emos.wx.db.pojo.TbUser;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Repository;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Set;

@Mapper
@Repository
public interface TbUserDao {
    //查询是否存在超级管理员用户
    public boolean haveRootUser();

    //保存用户数据
    public Integer insert(HashMap param);

    //根据openId查询用户id
    public Integer searchIdByOpenId(String openId);

    //查询用户权限
    public Set<String> searchUserPermissions(int userId);

    //查询用户信息
    public TbUser searchUserById(int userId);

    //查询员工姓名和部门名称
    public HashMap<String, String> searchNameAndDept(int userId);

    /*查询用户入职日期*/
    String searchUserHiredate(int userId);

    /*查询用户概要信息*/
    HashMap searchUserSummary(int userId);

    /*通过部门查询用户分组*/
    public ArrayList<HashMap> searchUserGroupByDept(String keyword);

    /*查询参加会议的成员*/
    public ArrayList<HashMap> searchMembers(List inParam);

    public HashMap searchUserInfo(int userId);

    public Integer searchDeptManagerId(int id);

    public int searchGmId();

    public List<HashMap> selectUserPhotoAndName(List param);

    public String searchMemberEmail(int id);

    public long searchUserCountInDept(int deptId);

    public int searchUserIdByEmail(String email);

    public int activeUserAccount(HashMap param);

    public int updateUserInfo(HashMap param);

    public int deleteUserById(int id);

    public ArrayList<HashMap> searchUserContactList();


}